<template>
    <div ><!--v-wechat-title="$route.meta.title"-->
     <div  class="swiper-container" >
      <swiper :options="swiperOption" ref="mySwiper" class="swiper-wrapper" >
        <!-- slides -->
        <swiper-slide class="swiper-slide" v-for="item in imageURL" :key="item.imageId"><img :src="item.url"></swiper-slide>
      </swiper>
      <!-- Optional controls -->
        <div class="swiper-pagination banner_new"></div>
      </div>
    <div class="slider-info">
        <h4 class="title">{{prodinfo.goodsName}}</h4>
        <div class="clerfix"></div>
        <div class="bottom-info" v-if="price_r.price>0">
            <s style="margin-right:15px; color: black; " v-if="prodinfo.goodsRealPrice!=prodinfo.goodsScreenPrice" v-show="prodinfo.discount==1">原价{{prodinfo.goodsRealPrice| amountMin100(2)}}</s>
            <p class="yuanjia">现价￥{{prodinfo.goodsScreenPrice |amountMin100(2)}}</p>
            <div class="quanhou-con">
                <div class="card-tip">券后价</div>
                <div class="price" >￥{{prodinfo.goodsScreenPrice-price_r.price |amountMin100(2)}}</div>
            </div>
            <div class="renshu" v-show="false">购买人数index</div>
        </div>
         <div class="bottom-info" v-else style="text-align:left;">
            <s style="margin-left:11px; color: red; " v-if="prodinfo.goodsRealPrice!=prodinfo.goodsScreenPrice" v-show="prodinfo.discount==1">原价{{prodinfo.goodsRealPrice| amountMin100(2)}}</s>
            <p class="yuanjia yuanjia-nothing">现价￥{{prodinfo.goodsScreenPrice |amountMin100(2)}}</p>
        </div>
    </div>
    <div class="coupon-info" v-if="price_r.price>0"><!--v-if="price_r.price>0"-->
       <div class="left-info">
           <h4 class="t-title">优惠</h4>
           <div class="jian-info">
               <div class="lft-j">减</div>
               <div class="rt-text">
                    <p class="text">领券至少可减 <span>￥{{price_r.price |amountMin100(2)}}</span></p>
                    <p class="text" v-show="false">领券后，再凑 <span>￥73 </span>可减 <span>￥5</span></p>
               </div>
           </div>
           <div class="quan-info">
               <div class="lft-q">券</div>
               <div class="rt-con">
                   <div class="same" v-for="item in CouponCompany"  :key="item.id">满{{item.reach1 | amountMin100(0)}}减{{item.score1 | amountMin100(0)}}</div>
               </div>
           </div>
       </div>
        <div class="right-info" @click="Receive">领券 <div class="icon"></div></div>
    </div>
     <div class="coupon-info" v-if="price_r.price>0">
     </div>
     <!--<div class="specifications">-->
        <!--<div class="specifications-con guige">-->
            <!--<span class="text">规格</span>-->
            <!--<span class="text1">暂无规格</span>&lt;!&ndash;选择颜色分类&ndash;&gt;-->
            <!--<i class="href-icon"></i>-->
        <!--</div>-->
        <!--<div class="specifications-con canshu">-->
            <!--<span class="text">参数</span>-->
            <!--<span class="text1">暂无参数....</span>-->
            <!--<i class="href-icon"></i>-->
        <!--</div>-->
    <!--</div>-->
      <div class="comment-info">
        <div class="top-info">
            <div class="left" v-if="CommentList.length!==undefined">商品评论（{{ commentPl}})</div>
            <div class="left" v-else>商品评论</div>
            <router-link href="#pagetwo" class="right"  data-transition="slide" :to="{name:'Commodity_comment',query:{goods:id}}" >查看全部评价 <i class="icon"></i></router-link>
        </div>
        <!-- <div class="keyword" :v-show="false">
            <a href="#pagetwo" data-transition="slide" class="same-box">温和不刺激（33）</a>
            <a href="#pagetwo" data-transition="slide" class="same-box">正品（12）</a>
            <a href="#pagetwo" data-transition="slide" class="same-box">实惠（11）</a>
            <a href="#pagetwo" data-transition="slide" class="same-box">物流快（22）</a>
        </div> -->
        <div class="comment-list"><!--评论-->
            <ul class="list-ul">
                <li class="list-li" v-for="item in CommentList" :key="item.id">
                    <div class="left-info" v-if="0==item.anonymous">
                        <img :src="item.headImgUrl" alt="">
                    </div>
                     <div class="left-info" v-else>
                        <img src="../../../assets/personal/images/niming.png" alt="">
                    </div>
                    <div class="right-info">
                        <div class="name" v-if="0==item.anonymous">{{item.nickName}}</div>
                        <div class="name" v-else>匿名用户</div>
                        <div class="commodity-info">
                            <span class="time">{{item.ctime | formatDate()}}</span>
                            <!-- <span class="color"> 颜色分类：白色连衣裙</span> -->
                            <!-- <span class="size"> 尺码：XL</span> -->
                        </div>
                        <div class="text-details" >
                         {{item.commentContent}}
                        </div>
                    </div>

                </li>
            </ul>
        </div>
    </div>
    <div class="buyer-show"><!--买家秀秀-->
        <div class="top-info">
            <div class="left"  v-if="CommentListMjs.length!==undefined">买家秀({{ CommentListMjs_length}})</div>
            <div class="left"  v-else>买家秀</div>
            <router-link href="buyer_show.html" class="right ui-link" data-ajax="false" :to="{name:'commodity_show',query:{goods:id}}">查看全部买家秀 <i class="icon"></i></router-link>
        </div>
        <div class="all-img imgContent" v-for="item in CommentListMjs" :key="item.id" >
            <div  class="urlimg">
                 <img v-for="(itemm,ind) in item.arimgs" :src="itemm" :key="ind">
            </div>
        </div>
    </div>
     <div class="business-info">
        <div class="left-img">
            <img :src=Store.headimgurl alt="">
        </div>
        <h3 class="shop-name"><router-link :to="{name:'Commodity',query:{id:shopsID}}"></router-link>{{Store.companyName}}</h3>
        <div class="right-info">
           <!--<router-link :to="{name:'Shops',query:{id:shopsID}}"> 查看店铺所有优惠 </router-link><i class="href-icon"></i>-->
          <router-link :to="{name:'Commodity',query:{id:shopsID}}"> 查看店铺所有优惠 </router-link><i class="href-icon"></i>
        </div>
    </div>
    <!-- <router-link href="javascript:void (0)" class="backTo" data-ajax="false" :to="{name:'Index'}">返回</router-link> -->
    <!--底部-->
    <div class="abouGoods"><!--详情-->
        <div class="abouGoodsXQ">
            <img src="../../../assets/personal/images/shangpinxiangqing_02.png">
        </div>
        <p class="detaileDescription">
            {{detaileDescription}}
        </p>
        <div v-for="item in xiangqingIMg" :key="item.imageId">
            <img :src="item.url">
        </div>
    </div>
      <div class="zhanwei"></div>
    <div class="shops-footer" data-position="fixed" data-tap-toggle="false" style="position:fixed;">
        <div class="lft-con">
            <div class="collection-info" @click="guanzhu_1" v-if="guanzhu2.length==0">
                <i class="icon"></i>
                <span>收藏</span>
            </div>
            <div class="collection-info" @click="guanzhuquxiao" v-else>
                <i class="icon"></i>
                <span>取消收藏</span>
            </div>
            <div class="detailed-list">
                <i class="icon"></i>
                 <!-- <a><span>清单</span></a> -->
                <router-link   :to="{name:'Commodity_details_list'}"><span>清单<span style="color:red;" v-if="listCount>0">({{listCount}})</span></span></router-link>
            </div>
        </div>
        <div class="button-group">
            <a @click="Detailedlist(0)" class="join-detailed" >加入清单</a>
            <!-- <router-link :to="{name:'Commodity_Settlement'}" class="buy" data-ajax="false">立即购买</router-link> -->
              <a  class="buy" @click="Detailedlist(1)">立即购买</a>
        </div>
        </div>
        <!--产品规格弹出层-->
<div class="guige-hide">
    <!--<div class="guige-hide-mc"></div>-->
    <div class="guige-hide-in">
        <i class="slide-close"></i>
        <div class="top-content">
            <div class="img-con"><img src="../../../assets/business/images/img1.png" alt=""></div>
            <div class="right-con">
                <p class="price">￥152 </p>
                <p class="text">库存1521</p>
                <p class="text1">请选择  尺码/颜色/数量  </p>
            </div>
        </div>
        <div class="size-content">
            <h4 class="size-title">尺码</h4>
            <div class="b-content">
                <div class="same active">S</div>
                <div class="same">M</div>
                <div class="same">L</div>
                <div class="same">XL</div>
            </div>
        </div>
        <div class="color-content">
            <h4 class="color-title">颜色</h4>
            <div class="b-content">
                <div class="same">白色</div>
                <div class="same">蓝色</div>
                <div class="same active">红色</div>
                <div class="same red">绿色</div>
            </div>
        </div>
        <div class="number-content">
            <span class="l-text">购买数量</span>
            <div class="r-info">
                <div class="shop-arithmetic">
                    <a href="javascript:;" class="minus">-</a>
                    <span class="num">1</span>
                    <a href="javascript:;" class="plus">+</a>
                </div>
            </div>
        </div>
        <div class="button-content">
            <a href="javascript:void (0)" class="join-qd" data-ajax="false">加入清单</a>
            <!-- <router-link :to="{name:'Commodity_Settlement'}" class="buy" data-ajax="false">立即购买</router-link> -->
              <a href="javascript:void (0)" class="buy">立即购买</a>
        </div>
        <div class="button-content1">
            <a href="#" class="ok">确定</a>
        </div>
    </div>
    <!--產品參數弹出层-->
<div class="canshu-hide canshu">
   <!-- <div class="canshu-hide-mc"></div>-->
    <div class="canshu-hide-in">
        <i class="slide-close"></i>
        <h4 class="title">产品参数</h4>
        <ul class="list-ul">
            <li class="list-li">
                <span class="lft-text">袖长</span>
                <span class="r-text">短袖</span>
            </li>
            <li class="list-li">
                <span class="lft-text">货号</span>
                <span class="r-text">08TXRC</span>
            </li>
            <li class="list-li">
                <span class="lft-text">版型</span>
                <span class="r-text">修身</span>
            </li>
            <li class="list-li">
                <span class="lft-text">衣长</span>
                <span class="r-text">中长款</span>
            </li>
            <li class="list-li">
                <span class="lft-text">领型</span>
                <span class="r-text">V领</span>
            </li>
            <li class="list-li">
                <span class="lft-text">袖型</span>
                <span class="r-text">常规</span>
            </li>
            <li class="list-li">
                <span class="lft-text">品牌</span>
                <span class="r-text">other/其他</span>
            </li>
            <li class="list-li">
                <span class="lft-text">成分含量</span>
                <span class="r-text">96%及以上</span>
            </li>
            <li class="list-li">
                <span class="lft-text">面料</span>
                <span class="r-text">棉</span>
            </li>
            <li class="list-li">
                <span class="lft-text">图案</span>
                <span class="r-text">纯色</span>
            </li>
        </ul>
    </div>
</div>
<!--產品參數弹出层 end-->
</div>
<!--产品规格弹出层-->
<div class="guige-hide">
    <!--<div class="guige-hide-mc"></div>-->
    <div class="guige-hide-in">
        <i class="slide-close"></i>
        <div class="top-content">
            <div class="img-con"><img src="../../../assets/business/images/img1.png" alt=""></div>
            <div class="right-con">
                <p class="price">￥152 </p>
                <p class="text">库存1521</p>
                <p class="text1">请选择  尺码/颜色/数量  </p>
            </div>
        </div>
        <div class="size-content">
            <h4 class="size-title">尺码</h4>
            <div class="b-content">
                <div class="same active">S</div>
                <div class="same">M</div>
                <div class="same">L</div>
                <div class="same">XL</div>
            </div>
        </div>
        <div class="color-content">
            <h4 class="color-title">颜色</h4>
            <div class="b-content">
                <div class="same">白色</div>
                <div class="same">蓝色</div>
                <div class="same active">红色</div>
                <div class="same red">绿色</div>
            </div>
        </div>
        <div class="number-content">
            <span class="l-text">购买数量</span>
            <div class="r-info">
                <div class="shop-arithmetic">
                    <a href="javascript:;" class="minus">-</a>
                    <span class="num">1</span>
                    <a href="javascript:;" class="plus">+</a>
                </div>
            </div>
        </div>
        <div class="button-content">
            <a >加入清单</a>
            <a href="javascript:void (0)" class="buy">立即购买</a>
            <!-- <router-link :to="{name:'Commodity_Settlement'}" class="buy" >立即购买</router-link> -->
        </div>
        <div class="button-content1">
            <a href="#" class="ok">确定</a>
        </div>
    </div>
</div>
<!--产品规格弹出层 end-->
<!--选择优惠券弹出层-->
<div class="coupon-hide" v-show="Receive_style">
    <!--<div class="coupon-hide-mc"></div>-->
    <div class="coupon-hide-in">
        <div class="top-info">
            <h4 class="title">店铺优惠券</h4>
            <i class="slide-close" @click="Receive"></i>
        </div>
        <p class="klq">可领优惠券</p>
        <ul class="coupon-list">
            <li class="list-li active" v-for="item in CouponCompany" :key="item.id">
                <div class="left">
                    <p class="price"> <span class="text1">￥{{item.score1 | amountMin100(0)}}</span><span class="text2">满{{item.reach1 | amountMin100(0)}}元可用</span></p>
                    <p class="time">有效期：{{item.couponTime | formatDate}}-{{item.couponEndtime | formatDate}}</p>
                </div>
                <div class="right">领取成功</div>
            </li>
        </ul>
        <div class="price-all">
            <input type="checkbox" checked="checked" class="check-box"/>
            <div class="in-text">
                商品售价￥{{prodinfo.goodsScreenPrice |amountMin100(2)}}，领券后 <span>￥{{(prodinfo.goodsScreenPrice-price_r.price) |amountMin100(2)}}</span>可减 <span>￥{{price_r.price |amountMin100(2)}}</span>
            </div>
        </div>
        <p class="bottom-text">以上价格计算仅为初步预估，不代表最终购买价格</p>
    </div>
</div>
<PhoneVerification ref="PhoneVerification" @getMessage="getVal"></PhoneVerification>
<!--选择优惠券弹出层end-->
</div>
</template>
<style scoped>
  @import "../../../assets/personal/css/commodity_details.css";
  .clearfix{
    clear: both;
  }
  .urlimg img{
    width: 160px;
    height: 160px;
    float: left;
  }
  .detaileDescription{
      padding: 10px 15px;
  }
</style>
<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import PhoneVerification from '@/components/PhoneVerification'
export default {
  components: {
    swiper,
    swiperSlide,
    PhoneVerification
  },
  data() {
      return {
        swiperOption: {//v-swiper
          autoplay: true,
            pagination: {
               el: '.swiper-pagination',
              }
        },
          imageURL:{},
          prodinfo:{},
          shopsID:0,
          Store:{},
          price_r:{},
          CouponCompany:{},
          CommentList:{},
          CommentListMjs:{},
          collectionType:'1',
          guanzhu2:{},
          collectionid:'',
          id:this.$route.query.id,//goodsID
          Receive_style:false,
          img_xuxu_url:'',
          commentPl:'',
          CommentListMjs_length: 0,
          listCount:0,
          PhoneVerificationStyle:'',//这是子组件传来的值
          TiTle:'',
          fenxiangUrl:'',
          urlid:'',
          subid:this.$route.query.subid,
          fk:this.$route.query.fk,
          xiangqingIMg:{},
          detaileDescription:''
      }
  },
   mounted(){
      this.shops();
       this.image_s();
       this.guanzhu_2();
       this.comment();
       this.xiuxiu();
       this. DetailedlistShow();
       this.detailsAlbums();
   },

   methods: {
        isShare(){//判断是否分享
            if(0==this.subid){
                window.localStorage.isShare=0
            }else if(1==this.subid){
                window.localStorage.isShare=1
            }
            if("undefined"==typeof(this.fk)){
                window.localStorage.fk="1-39-0-0-0-0"
            }else{
                window.localStorage.fk=this.fk
            }
        },
        getwxconfig(){
          var vm= this;
          console.log(vm);
          this.$http.get(this.APIURL_PREFIX+"/api/wxs/config?url="+escape(location.href.split('#')[0])).then((response) => {
            console.log(response.data);
            var appid = 'wx488ae3f57360b7ea';
            wx.config({
              debug: false,
              appId: appid,
              timestamp: response.data.data.timestamp,
              nonceStr: response.data.data.noncestr,
              signature: response.data.data.signature,
              jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone','scanQRCode']
            });
            wx.ready(function(){
              wx.onMenuShareTimeline({
                title: vm.TiTle,
                link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-"+localStorage.headid+"-"+vm.shopsID+"-"+vm.id,
                // link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-0"+"-"+vm.shopsID+"-"+vm.id,
                imgUrl:vm.fenxiangUrl,
                desc:vm.TiTle,
                success: function () {
                },
                cancel: function () {
                }
              });
              wx.onMenuShareAppMessage({
                title: vm.TiTle,
                link:   "http://"+window.location.host+"/wap/wx/login?fk=1-39-"+localStorage.headid+"-"+vm.shopsID+"-"+vm.id,
                // link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-0"+"-"+vm.shopsID+"-"+vm.id,
                imgUrl:vm.fenxiangUrl,
                desc:vm.TiTle,
                success: function () {
                },
                cancel: function () {
                }
              });
              wx.onMenuShareQQ({
               title: vm.TiTle,
                link:  "http://"+window.location.host+"/wap/wx/login?fk=1-39-"+localStorage.headid+"-"+vm.shopsID+"-"+vm.id,
                // link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-0"+"-"+vm.shopsID+"-"+vm.id,
                imgUrl:vm.fenxiangUrl,
                desc:vm.TiTle,
                success: function () {
                },
                cancel: function () {
                }
              });
              wx.onMenuShareWeibo({
               title: vm.TiTle,
                link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-"+localStorage.headid+"-"+vm.shopsID+"-"+vm.id,
                // link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-0"+"-"+vm.shopsID+"-"+vm.id,
                imgUrl:vm.fenxiangUrl,
                desc:vm.TiTle,
                success: function () {
                },
                cancel: function () {
                }
              });
              wx.onMenuShareQZone({
              title: vm.TiTle,
                link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-"+localStorage.headid+"-"+vm.shopsID+"-"+vm.id,
                // link: "http://"+window.location.host+"/wap/wx/login?fk=1-39-0"+"-"+vm.shopsID+"-"+vm.id,
                imgUrl:vm.fenxiangUrl,
                desc:vm.TiTle,
                success: function () {
                },
                cancel: function () {
                }
              });

            });
          }).catch(function(err){
            console.log(err)
          });

        },
       Receive:function(){//领取券的动作
           this.Receive_style=!this.Receive_style
       },
       comment(){//评论
            this.$http.get(this.APIURL_PREFIX+"/api/wap/commentPl/goods",{ params:{page:1,rows:4,goodsId:this.id}}).then((response) => {
                this.CommentList=response.data.data//.plsList
            }).catch(function(err){
                 console.log(err)
            })
       },
        xiuxiu(){//咻咻咻
            this.$http.get(this.APIURL_PREFIX+"/api/wap/commentXx/goods",{ params:{page:1,rows:1,goodsId:this.id}}).then((response) => {
                 var arXX = response.data.data;
                 arXX = arXX.map(function(item,index,ar){
                     item.arimgs = item.imgContent.split(",");
                     return item;
                 })
                 this.CommentListMjs = arXX;
            }).catch(function(err){
                 console.log(err)
            })
       },
       shops(){//商品详情
           this.$http.get(this.APIURL_PREFIX+"/api/wap/coupon/goods",{ params:{id:this.id}}).then((response) => {
            this.prodinfo= response.data.data.Goods;
           // this.$route.meta.title =this.prodinfo.goodsName
            this.TiTle=this.prodinfo.goodsName
            this.fenxiangUrl=this.prodinfo.goodsThum
            console.log(this.fenxiangUrl)
            this.detaileDescription=response.data.data.Goods.detaileDescription
            if(response.data.data.CouponGoods.length>0){
                this.price_r=response.data.data.CouponGoods[0];
                console.log(this.price_r)
            }
            this.commentPl=response.data.data.commentPl
            this.CommentListMjs_length=response.data.data.CommentListMjs
            this.CouponCompany=response.data.data.CouponCompany;
            this.shopsID=this.prodinfo.goodsProviderId;
            console.log(this.CommentList)
            this.getwxconfig();
            this.TheStore();
            this.isShare();
        }).catch(function(err){
            console.log(err)
        }).then();
       },
       image_s(){
            this.$http.get(this.APIURL_PREFIX+"/api/goods/albums/"+this.id).then((response) => {
            this.imageURL= response.data;
        }).catch(function(err){
            console.log(err)
        });
       },
       detailsAlbums(){//详情
            this.$http.get(this.APIURL_PREFIX+"/api/goods/detailsAlbums/"+this.id).then((response) => {
            this.xiangqingIMg= response.data;
        }).catch(function(err){
            console.log(err)
        });
       },
       TheStore(){
         this.$http.get(this.APIURL_PREFIX+'/api/wap/company/SelectOnly/'+this.shopsID).then((response) => {
                    this.Store=response.data.data
                    this.urlid=this.Store.userId
				}).catch(function(err){
					console.log(err)
				})
       },
       guanzhu_1:function(){//1是关注
            this.$refs.PhoneVerification.childMethod();
            console.log(this.PhoneVerificationStyle+"1112222333")
            if("成功"==this.PhoneVerificationStyle){
                 this.$http.post(this.APIURL_PREFIX+'/api/wap/collection/',$.param({goodsId:this.id,collectionType:this.collectionType})).then((response) => {
                    this.guanzhu_2()
                    layer.msg("加入收藏成功")
			    }).catch(function(err){

		         })
            }else{

            }
       },
       guanzhu_2(){//2是获取关注没关注
            this.$http.get(this.APIURL_PREFIX+'/api/wap/collection?goodsId='+this.id+"&collectionType=1").then((response) => {
                  this.guanzhu2=response.data.data;
                 // console.log(this.guanzhu2)
                  this.collectionid=this.guanzhu2[0].id
				}).catch(function(err){
			})
       },
       guanzhuquxiao(){//取消关注
             this.$refs.PhoneVerification.childMethod();
             if("成功"==this.PhoneVerificationStyle){
                 this.$http.delete(this.APIURL_PREFIX+'/api/wap/collection/'+this.collectionid).then((response) => {
                    this.guanzhu_2()
                    console.log(response.data+"z")
                    layer.msg("取消收藏成功")
			    }).catch(function(err){

		         })
             }else{

             }
       },
       Detailedlist(id){///api/wap/shoppingCart  加入清单
            this.$refs.PhoneVerification.childMethod();
                if("成功"==this.PhoneVerificationStyle){
                    this.$http.post(this.APIURL_PREFIX+"/api/wap/shoppingCart",$.param({goodsId:this.id})).then((response) => {
                if(id==1){
                    if(response.data.code ==0){
                            window.localStorage.buynowid = this.id;
                            this.$router.push({ name: "Commodity_details_list"})
                    }else if(response.data.code ==6){
                        layer.msg(response.data.msg)
                    }
                }else{
                    if(response.data.code ==0){
                        layer.msg("加入清单成功")
                        this.DetailedlistShow();
                    }else if(response.data.code ==6){
                        layer.msg(response.data.msg)
                    }
                    else{
                        layer.msg("加入失败");
                    }
                }

                }).catch(function(err){
                    console.log(err)
                })
             }else{

             }
       },
       DetailedlistShow(){
             this.$http.get(this.APIURL_PREFIX+'/api/shoppingCart/count').then((response) => {
					 this.listCount=response.data.data
	    	}).catch(function(err){
	     	console.log(err)
				})
       },
      getVal(msg){//msg就是传过来的数据了  这只是个形参  名字可以随意
         this.PhoneVerificationStyle=msg;//然后将数据赋值给
     }
   },
    beforeRouteLeave( to, from,next){
        //   alert("123"+to.name+"456"+to.meta.isUseCache )
        if (to.name == 'Index') {
            console.log("Index")
            to.meta.isUseCache = true;
        }else if(to.name == 'Seach'){
            console.log("Seach")
            to.meta.isUseCache = true;
        } else if (to.name=='Commodity'){
            console.log("Commodity")
            to.meta.isUseCache = true;
        }
        next();
  }
}
</script>
